package com.jaychen.spring.context;

import com.jaychen.spring.factory.config.AbstractBeanFactory;

/**
 * @Author Jay Chen
 * @Date 2020/11/10 12:39
 */
public abstract class AbstractApplicationContext implements ApplicationContext {

    protected AbstractBeanFactory beanFactory;

    public AbstractApplicationContext(AbstractBeanFactory beanFactory) {
        this.beanFactory = beanFactory;
    }

    @Override
    public Object getBean(String beanName) {
        return beanFactory.getBean(beanName);
    }

    void refresh() throws Exception {
    }
}
